import http from "../utils/http";
export default {
    add( price, productAttr, productBrand, productCategoryId, productId, productName, productPic, productSkuCode, productSkuId, productSn, productSubTitle, quantity) {
        return http.post("/cart/add", {price, productAttr, productBrand, productCategoryId, productId, productName, productPic, productSkuCode, productSkuId, productSn, productSubTitle, quantity})
    },
    clear() {
        return http.post("/cart/clear")
    },
    delete(ids) {
        return http.posts("/cart/delete", { ids })
    },
    getById(productId) {
        return http.get("/cart/getById/"+productId)
    },
    getProduct(productId) {
        return http.get("/cart/getProduct/"+productId)
    },
    list() {
        return http.get("/cart/list")
    },
    quantity(id, quantity) {
        return http.get("/cart/update/quantity", { id, quantity })
    },
    promotion(cartIds) {
        return http.get("/cart/list/promotion", { cartIds })
    },
    attr(data) {
        return http.post("/cart/update/attr",data)
    }
}